import os, sys
argv = sys.argv

if len(argv) <= 2:
    f = os.popen('mkpasswd -m SHA-512 %s' % argv[1])
else:
    f = os.popen('mkpasswd -m SHA-512 %s %s' % (argv[1], argv[2]))
print '生成的密码是：', f.read()